package com.lqfan.autoAnswerQ.model.subject;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author lqfan
 * @since 2020-04-04
 */
@Data
public class Subject extends Model<Subject> {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.UUID)
    private String id;

    @TableField("content")
    private String content;

    @TableField("typeId")
    private int typeId;

    @TableField("questionId")
    private String questionId;

    /**
     * 0(未收藏),1(收藏)
     */
    @TableField("isCollect")
    private Long isCollect;

    private String answer;

    @TableField("userId")
    private String userId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Subject{" +
        "id=" + id +
        ", content=" + content +
        ", typeId=" + typeId +
        ", questionId=" + questionId +
        ", isCollect=" + isCollect +
        ", answer=" + answer +
        "}";
    }
}
